﻿/* Nibiru Studio Engine Version [1062] */
// Copyright (c) 2020-2023 Nibiru. All rights reserved.
#pragma once
#include "Apis/NComponent.h"
#include "Apis/NEngineApi.h"

ENGINE_NAMESPACE_BEGIN

#define SceneCapture_API DLLEXPORT


class EyeManager;
OBJECT_CLASS(SceneCapture)
class SceneCapture_API SceneCapture : public NComponent
{
	DECLARE_CLASS(SceneCapture, NComponent)
	DECLARE_RTTI
	ENABLE_REFLECTION
public:
	SceneCapture() = default;
	virtual ~SceneCapture() = default;
	
	virtual void Start() override;
	virtual void Update() override;
	virtual void OnDestroy() override;
	virtual void PostEditChangeProperty(std::string& propertyName) override;

	virtual void Serialize(Archive& ar) override;
	virtual void LateDeserialize(Archive& ar) override;

private:
    // switch scene
    void switchToCalib();
    //
    void updateScale();
    void saveImage();


private:
    EyeManager* m_pEyeManager = nullptr;
    NLabelPtr m_textMessage;
    NActorPtr m_capturePoint; // 采集点
    //
    int m_captureIndex = 0;
    vector<pair<float, float>> m_captureDotList; // 采集点集合
    string m_capPosStr;
    bool m_capScaleValid = false;
    float m_capScale = 1.0f;
	
};
DECLARE_PTR(SceneCapture)
ENGINE_NAMESPACE_END
